Welcome![Sign In][Sign Up]
Location:
Search - c socket p

Search list

[Other resourceWINDOWS__socket13

Description: 利用“原始套接字”(Raw Socket),我们可访问位于基层的传输协议。本章专门讲解如 何运用这种原始套接字,来模拟I P的一些实用工具,比如Tr a c e r o u t e和P i n g程序等等。使用原 始套接字,亦可对I P头信息进行实际的操作。本章只关心I P协议;至于如何针对其他协议使 用原始套接字,我们不打算提及。而且,大多数协议(除AT M以外)根本就不支持原始套接 字。所有原始套接字都是使用S O C K _ R AW这个套接字类型来创建的,而且目前只有Wi n s o c k 2提供了对它的支持。因此,无论Microsoft Windows CE 还是老版本的Windows 95 (无 Winsock 2升级)均不能利用原始套接字的能力。-use "raw socket" (Raw Socket), we can visit at the grassroots transmission agreements. This chapter specifically on how to use the original socket, I P to simulate some practical tools, For example Tr a c e r t o u e and P i n g procedures, and so on. Original socket, I can right the first P information of the actual operation. I only care about this chapter P Agreement; As to how the other agreements original socket, we do not intend to mention. Moreover, most agreements (except outside AT M) simply does not support the original socket. All original socket are using S O C K R AW _ the socket types to create, but it's only Wi n o c k 2 of the support it. Therefore, Whether Microsoft Windows CE or an older version of Windows 95 (non-Win sock escalation 2) are not using the ori
Platform: | Size: 692344 | Author: 楼洛阳 | Hits:

[Other resourceATMega8_PWM_LCD

Description: 利用Atmel ATMega8 的定时器功能和PWM功能,制作频率发生器。 有LCD显示,并可实时调节ATMega8的各个相关的寄存器内容。 支持红外遥控器输入。 ..\\频率发生器.prj ......主芯片项目文件 ..\\频率发生器.c ......主芯片主程序 ..\\频率发生器.asm ......主芯片汇编文件(自动生成) ..\\频率发生器.hex ......可供烧录的文件 ..\\频率发生器_client.prj ......副芯片项目文件 ..\\频率发生器_client.c ......副芯片主程序 ..\\频率发生器_client.asm ......副芯片汇编文件 ..\\频率发生器_client.hex ......可供烧录的文件 ..\\Config.h ......硬件配置文件 ..\\Input.c ......接受红外遥控器输入并在LCD中显示 ..\\LCD_Interface.c ......LCD 1602 接口文件 ..\\Menu.c ......在LCD中显示菜单和其它信息 ..\\Menu.h ......菜单定义文件 ..\\Readme.txt ......本说明文件-use the timer function and PWM function, the production of frequency generator. A LCD display, real-time adjustments can socket all the relevant registers contents. Support infrared remote control input. .. \\ Frequency generator. Prj ...... main chip project document .. \\ frequency generator. C ..... . Main Chip main program .. \\ frequency generator. asm2 ...... main chip compilation document (automatic generation) .. \\ frequency generator. hex ...... for copying documents .. \\ frequency generator _client.p rj ...... vice chip project document .. \\ frequency generator vice-_client.c ...... film main program .. \\ frequency generator _client.asm ...... Deputy Chip compilation .. \\ frequency _client.hex ...... rate generator for copying documents .. \\ Config.h. ..... hardware configuration fi
Platform: | Size: 61499 | Author: Aleyn.wu | Hits:

[WinSock-NDISTCP实现客户服务器聊天程序

Description:

 

操作系统课程设计任务书


一、设计题目:多机进程通信

应用Socket进程通信技术编写聊天室程序,实现基于服务器的并发多机信息转发。如果各客户端在线则可以实时聊天、发送接收文件,如果某客户端离线,则发送给他的消息可由服务器端进行内容缓存,待重新连线后可以自动接收通过服务器转发的信息或文件。缓存与转发的控制算法可参考操作系统课程中生产者消费者进程同步方法、缓冲池技术等相关理论。
二、设计思路和功能的详细描述
采用TCP协议,所以属于客户机/服务器模式,因此需要聊天服务器端和聊天客户端两个程序,实现的功能是:任意一台装有客户端程序的计算机都可以通过服务器端的IP地址与服务器相连,然后进入聊天室与连接到服务器的其他客户进行聊天。当客户聊天结束时,可以点断开与服务器断开连接,以释放进程让其他等待的客户进入聊天室,本聊天室最大同时支持50个客户端的连接,如果服务器配置较高可以修改程序来增加同时连接数。
三、采用的方法、技术、运行环境及其配置
本聊天程序采用TCP协议,用VC++编写,属于客户机/服务器模式。采用了多线程的机制。其中使用windows Sockets实现多台计算机(多个进程)间的通信,SOCKET实际在计算机中提供了一个通信端口,可以通过这个端口与任何一个具有SOCKET接口的计算机通信。应用程序在网络上传输,接收的信息都通过这个SOCKET接口来实现。客户机/服务器模式中客户应用程序向服务器程序请求服务。一个服务程序通常在一个众所周知的地址监听对服务的请求,也就是说,服务进程一直处于休眠状态,直到一个客户对这个服务的地址提出了连接请求。在这个时刻,服务程序被“惊醒”并且为客户提供服务即对客户的请求作出适当的反应。本聊天程序就是基于这中思想实现的,程序分为两大部分:TCP聊天服务器端和TCP聊天客户端。两者都拥有各自的SOCKET接口,其中服务器端SOCKET接口需要绑定到固定地址上(实现语句:ock=Socket(AF_INET,SOCK_STREAM,0);),等待客户端的连接(实现语句:listen(sock,5);)。等待客户端的连接的过程就是通过多进程机制来实现的。
聊天程序是在VISUAL C++6.0上编译实现的,在WINDOWS2000,XP上测试运行成功。
对客户计算机配置无特殊要求,由于所设置的最大连接进程为50,所以对服务器要求也不高。
四、关键源程序及其详细的注释
<一>、服务器端
1
、Socket初始化
//
初始化对话框
BOOL CCSocketDlg::OnInitDialog()
{

count=0;

m_list.InsertColumn(0,"消息");

m_list.SetColumnWidth(0,435);

m_edit.SetLimitText(99);

.

.

.

.

 


Platform: | Size: 55808 | Author: lenjear | Hits:

[SCMATMega8_PWM_LCD

Description: 利用Atmel ATMega8 的定时器功能和PWM功能,制作频率发生器。 有LCD显示,并可实时调节ATMega8的各个相关的寄存器内容。 支持红外遥控器输入。 ..\频率发生器.prj ......主芯片项目文件 ..\频率发生器.c ......主芯片主程序 ..\频率发生器.asm ......主芯片汇编文件(自动生成) ..\频率发生器.hex ......可供烧录的文件 ..\频率发生器_client.prj ......副芯片项目文件 ..\频率发生器_client.c ......副芯片主程序 ..\频率发生器_client.asm ......副芯片汇编文件 ..\频率发生器_client.hex ......可供烧录的文件 ..\Config.h ......硬件配置文件 ..\Input.c ......接受红外遥控器输入并在LCD中显示 ..\LCD_Interface.c ......LCD 1602 接口文件 ..\Menu.c ......在LCD中显示菜单和其它信息 ..\Menu.h ......菜单定义文件 ..\Readme.txt ......本说明文件-use the timer function and PWM function, the production of frequency generator. A LCD display, real-time adjustments can socket all the relevant registers contents. Support infrared remote control input. .. \ Frequency generator. Prj ...... main chip project document .. \ frequency generator. C ..... . Main Chip main program .. \ frequency generator. asm2 ...... main chip compilation document (automatic generation) .. \ frequency generator. hex ...... for copying documents .. \ frequency generator _client.p rj ...... vice chip project document .. \ frequency generator vice-_client.c ...... film main program .. \ frequency generator _client.asm ...... Deputy Chip compilation .. \ frequency _client.hex ...... rate generator for copying documents .. \ Config.h. ..... hardware configuration fi
Platform: | Size: 61440 | Author: Aleyn.wu | Hits:

[Windows DevelopYouCao

Description: I P C机制的即“邮槽” (M a i l s l o t) 。用最简单的话来说,通过邮槽,客户机进程可将消息传送或广播给一个或多个服务器进程。在同一台计算机的不同进 程之间,或在跨越整个网络的不同计算机的进程之间,协助进行消息的传输。用邮槽来开发应用程序是一件非常简单的事情,不要求对 T C P / I P或I P X这样的基层网络传送协议有着非常深入的了解。一种具体协议创建套接字所需的基本步骤。-In a variety of network transmission protocol, in order to provide a network programming interfaces are familiar with the U.S., should pay attention to some of the various characteristics of network protocols. This chapter will talk about a comprehensive agreement to use a specific attention should be drawn to some of the characteristics, including some of the basic principles of network connections. In addition, we will also discuss how Wi nsock inquiry procedure to protocol information, and to explore a specific protocol for the creation of the basic steps required socket.
Platform: | Size: 386048 | Author: kunlunshanjiao | Hits:

[Windows DevelopDetailed-notes-C-P-P-in-depth

Description: C++深入详解笔记 Lesson1: Windows程序运行原理及程序编写流程 Lesson2: 掌握C++基本语法 Lesson3: MFC框架程序剖析 Lesson4: 简单绘图 Lesson5: 文本编程 Lesson6: 菜单编程 Lesson7: 对话框编程 Lesson9: 定制应用程序的外观 Lesson10: 绘图控制 Lesson11 图形的保存和重绘 Lesson12 文件操作 Lesson 13: 文档串行化 Lesson14 网络编程 Lesson 15 多线程 Lesson 16 线程同步与异步套接字 Lesson17进程间通信 Lesson18 Active控件 Lesson19 动态链接库DLL Lesson20 Hook与数据编程-C++ in-depth Detailed notes Lesson1: Windows program runs principles and procedures for the preparation process Lesson2: master the C++ basic syntax Lesson3: MFC framework of the program analysis Lesson4: simple drawing Lesson5: Text Programming Lesson6: Menu programming Lesson7: dialog programming Lesson9: custom applications Appearance Lesson10: Lesson11 graphics drawing control and redraw the preservation of file operations Lesson12 Lesson 13: Network Programming Document serialization Lesson14 Lesson 16 Lesson 15 threads simultaneous multi-threading and asynchronous inter-process communication socket Lesson17 Lesson19 Lesson18 Active control, dynamic-link library DLL Lesson20 Hook and Data Programming
Platform: | Size: 492544 | Author: | Hits:

[Ftp ClientMy-FTP-Client(CSocket-P-socket)

Description: My FTP client implement by C++. easy interface with two panel. Very easy to learn.
Platform: | Size: 649216 | Author: ngocgodwar | Hits:
« 1 2»

CodeBus www.codebus.net